package com.xuzimian.alibaba.coding.guideline;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CollectionNPE {

    public static void main(String[] args) {
        Map<String,String> map= new HashMap<>();
        List list = new ArrayList<>();
        Object obj = new Object();
        list.add(obj);

        if (!list.isEmpty()) {
            list.remove(obj);
            System.out.println(list.get(0));
        }
    }
}
